this.BX=this.BX||{};this.BX.Landing=this.BX.Landing||{};this.BX.Landing.UI=this.BX.Landing.UI||{};(function(e,t,n){"use strict";var i,a,r,o,s;function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){babelHelpers.defineProperty(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var c=function(e){babelHelpers.inherits(n,e);function n(){var e;var i=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};babelHelpers.classCallCheck(this,n);e=babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(n).call(this));e.setEventNamespace("BX.Landing.UI.Card.BaseCard");e.cache=new t.Cache.MemoryCache;e.data=d({},i);e.options=e.data;e.id=t.Type.isStringFilled(e.options.id)?e.options.id:t.Text.getRandom();e.hidden=t.Text.toBoolean(e.options.hidden);e.onClickHandler=t.Type.isFunction(e.options.onClick)?e.options.onClick:function(){};e.onClick=e.onClick.bind(babelHelpers.assertThisInitialized(e));e.layout=e.getLayout();e.header=e.getHeader();e.body=e.getBody();e.setTitle(e.options.title||"");e.setHidden(e.options.hidden);if(t.Type.isStringFilled(e.options.className)){t.Dom.addClass(e.layout,e.options.className)}if(t.Type.isObject(e.options.attrs)){t.Dom.adjust(e.layout,{attrs:e.options.attrs})}t.Event.bind(e.layout,"click",e.onClick);return e}babelHelpers.createClass(n,[{key:"getLayout",value:function e(){var n=this;return this.cache.remember("layout",(function(){return t.Tag.render(i||(i=babelHelpers.taggedTemplateLiteral(['\n\t\t\t\t<div class="landing-ui-card">\n\t\t\t\t\t<div class="landing-ui-card-header-wrapper">\n\t\t\t\t\t\t',"\n\t\t\t\t\t</div>\n\t\t\t\t\t","\n\t\t\t\t</div>\n\t\t\t"])),n.getHeader(),n.getBody())}))}},{key:"getRemoveButton",value:function e(){return this.cache.remember("remove",(function(){return t.Tag.render(a||(a=babelHelpers.taggedTemplateLiteral(['\n\t\t\t\t<div class="landing-ui-card-block-remove"></div>\n\t\t\t'])))}))}},{key:"getHeader",value:function e(){return this.cache.remember("header",(function(){return t.Tag.render(r||(r=babelHelpers.taggedTemplateLiteral(['\n\t\t\t\t<div class="landing-ui-card-header"></div>\n\t\t\t'])))}))}},{key:"getBody",value:function e(){return this.cache.remember("body",(function(){return t.Tag.render(o||(o=babelHelpers.taggedTemplateLiteral(['\n\t\t\t\t<div class="landing-ui-card-body"></div>\n\t\t\t'])))}))}},{key:"addWarning",value:function e(n){t.Dom.append(t.Tag.render(s||(s=babelHelpers.taggedTemplateLiteral(['\n\t\t\t\t<div class="landing-ui-card-body-warning">',"</div>\n\t\t\t"])),n),this.getBody());t.Dom.addClass(this.getBody(),"--warning")}},{key:"setTitle",value:function e(t){this.getHeader().textContent=t}},{key:"setHidden",value:function e(n){t.Dom.attr(this.getLayout(),"hidden",n||null)}},{key:"onClick",value:function e(){this.onClickHandler(this);this.emit("onClick")}},{key:"show",value:function e(){this.setHidden(false)}},{key:"isShown",value:function e(){return t.Dom.attr(this.getLayout(),"hidden")===null}},{key:"hide",value:function e(){this.setHidden(true)}},{key:"getNode",value:function e(){return this.getLayout()}}]);return n}(n.EventEmitter);e.BaseCard=c})(this.BX.Landing.UI.Card=this.BX.Landing.UI.Card||{},BX,BX.Event);
//# sourceMappingURL=basecard.bundle.map.js